<template>
	<div class="submitorder">
		<div class="header">
			<div class="H_d">
				<div>身份证名称:</div>
				<div>{{arr.idcardName}}</div>
			</div>
			<div class="H_d">
				<div>身份证号:</div>
				<div>{{arr.idcardNum}}</div>
			</div>
			<div class="H_d">
				<div>联系电话:</div>
				<div>{{arr.salePhone}}</div>
			</div>
			<div class="H_d">
				<div>地址:</div>
				<div>{{arr.storeArea}}{{arr.storeAddress}}</div>
			</div>
		</div>
		
		<div class="lei">
			<div>铺伙类型{{title}}</div>
			<div>{{time}}</div>
		</div>
		
		<div class="content">
			<div class="C_d" v-for="item in list">
				<!--<div class="title">{{item.showSkuName}}</div>-->
				<div class="title"><span>{{item.spuName}}</span><span>{{item.showSkuName}}</span></div>
				<div class="shu">
					<span>{{item.totalCount}}</span>
				</div>
				<div class="qian">￥{{item.onePrice}}</div>
			</div>
			
		</div>
		
		<div class="footer">
			确认{{num}}件商品  一共{{zong}}元 小柜{{gui}}元
			<button @click="dui" disabled="disabled">待付款</button>
		</div>
		
	</div>
</template>

<script>
	import { BaseUrl } from '../Baseurl/common.js';
	export default{
		data(){
			return{
				storePhone:'',
				puhuoId:'', 
				time:'',
				num:0,
				arr:[],
				list:[],
				title:'',
				zong:0,
				gui:0
			}
		},
		created(){
			this.puhuoId = this.$route.query.puhuoId
			var bb = localStorage.getItem("order")
			this.title = localStorage.getItem("title")
//			var aa=[]
			var bb=JSON.parse(bb)
			this.time = bb.createTime
			this.arr = bb.orderIdentity
			this.list = bb.skus
					
					var gui = localStorage.getItem("guizi")
					this.gui = gui
					var num=0
					var zong=0
					var list = this.list
					for(var i=0;i<list.length;i++){
						zong += list[i].totalCount * list[i].onePrice
						num += list[i].totalCount
					}
					this.num =num
					this.zong = Number(zong) + Number(gui)
		}
		,
		methods:{
			dui:function(){
				
			}
		}
	}
</script>

<style scoped="scoped">
	.submitorder{
		width: 100%;
		height: 100%;
		overflow-y: auto;
	}
	.header{
		width: 100%;
		padding: 0.5rem 0.2rem;
		border-bottom: 1px solid #333333;
	}
	.H_d{
		display: flex;
	}
	.H_d div:nth-child(1){
		width: 2rem;
		text-align: right;
		margin-right: 0.1rem;
	}
	.H_d div:nth-child(2){
		width: 5rem;
		text-align: left;
	}
	.lei{
		display: flex;
		padding: 0.2rem 0.2rem;
		justify-content: space-between;
		border-bottom: 1px solid #333333;
	}
	.content{
		width: 100%;
	}
	.C_d{
		padding: 0.2rem 0.2rem;
		box-sizing: border-box;
		border-bottom: 1px solid #333333;
		display: flex;
		align-items: center;
		justify-content: space-between;
	}
	.title{
		width: 2rem;
		text-align: center;
		
	}
	.title span{
		width: 2rem;
		display: block;
		overflow : hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}
	.shu{
	}
	.shu span{
		width: 0.5rem;
	}
	.qian{
	}
	.footer{
		padding: 0.2rem 0.2rem;
		box-sizing: border-box;
		border-bottom: 1px solid #333333;
		display: flex;
		align-items: center;
		justify-content: space-between;
	}
	button{
		width: 2rem;
	}
</style>